﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Entities.IRepository;
using DAL.PBKT;
using Entities.PBKT;

namespace WindowsForms.PBKT
{
    public partial class FormLichThiDau : Form
    {
        ILichThiDau ltd = new BLLichThiDauRepository();
        public FormLichThiDau()
        {
            InitializeComponent();
            
        }

        private void btnLoad_Click(object sender, EventArgs e)
        {
            LoadLichThiDau();
        }

        private void LoadLichThiDau()
        {
           dgvLTD.DataSource = LichThiDau.Objects.All().ToList();
          //  dgvLTD.DataSource = LichThiDau.Objects.Find(x => x.MaDoi1 == "CTK33").ToList();
            
        }

        private void dgvLTD_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
   
            if (e.ColumnIndex == 7)
            {
                FormThemLichThiDau frm = new FormThemLichThiDau();
                frm.ShowDialog();
            }
        }

        private void btnAdd_Click(object sender, EventArgs e)
        {
            FormThemLichThiDau frm = new FormThemLichThiDau();
            frm.ShowDialog();
        }

        

    }
}
